package com.ktgj.service.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.service.mapper.OrderTrackingMapper;
import com.ktgj.service.domain.OrderTracking;
import com.ktgj.service.service.IOrderTrackingService;

/**
 * 订单跟踪Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-03
 */
@Service
public class OrderTrackingServiceImpl implements IOrderTrackingService 
{
    @Autowired
    private OrderTrackingMapper orderTrackingMapper;

    /**
     * 查询订单跟踪
     * 
     * @param orderTrackingid 订单跟踪ID
     * @return 订单跟踪
     */
    @Override
    public OrderTracking selectOrderTrackingById(Long orderTrackingid)
    {
        return orderTrackingMapper.selectOrderTrackingById(orderTrackingid);
    }

    /**
     * 查询订单跟踪列表
     * 
     * @param orderTracking 订单跟踪
     * @return 订单跟踪
     */
    @Override
    public List<OrderTracking> selectOrderTrackingList(OrderTracking orderTracking)
    {
        return orderTrackingMapper.selectOrderTrackingList(orderTracking);
    }

    /**
     * 新增订单跟踪
     * 
     * @param orderTracking 订单跟踪
     * @return 结果
     */
    @Override
    public int insertOrderTracking(OrderTracking orderTracking)
    {
        orderTracking.setCreateTime(DateUtils.getNowDate());
        return orderTrackingMapper.insertOrderTracking(orderTracking);
    }

    /**
     * 修改订单跟踪
     * 
     * @param orderTracking 订单跟踪
     * @return 结果
     */
    @Override
    public int updateOrderTracking(OrderTracking orderTracking)
    {
        orderTracking.setUpdateTime(DateUtils.getNowDate());
        return orderTrackingMapper.updateOrderTracking(orderTracking);
    }

    /**
     * 批量删除订单跟踪
     * 
     * @param orderTrackingids 需要删除的订单跟踪ID
     * @return 结果
     */
    @Override
    public int deleteOrderTrackingByIds(Long[] orderTrackingids)
    {
        return orderTrackingMapper.deleteOrderTrackingByIds(orderTrackingids);
    }

    /**
     * 删除订单跟踪信息
     * 
     * @param orderTrackingid 订单跟踪ID
     * @return 结果
     */
    @Override
    public int deleteOrderTrackingById(Long orderTrackingid)
    {
        return orderTrackingMapper.deleteOrderTrackingById(orderTrackingid);
    }
}
